package Control;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringValidator {

	public static boolean checkSpecialChar(String toCheck) {
		boolean isContainsSC = false;
		if (toCheck != null && !toCheck.equals("")) {
			Matcher m = Pattern.compile("[\\W]").matcher(toCheck);
			while (m.find()) {
				isContainsSC = true;
			}
		}
		return isContainsSC;
	}

	public static boolean notEmpty(String s) {
		return (s != null && s.length() > 0);
	}
}
